Skip to content

Conversation

@wtfzambo
Copy link

@wtfzambo wtfzambo commented Jan 12, 2026

Fixes apache/openserverless#190

Summary of Changes

  1. Build Process (cli/Taskfile.yml):
  • Added a new task clone-embedded-tasks that clones the apache/openserverless-task repository into cli/embedded-tasks using the branch specified in branch.txt.
  • Updated the build task to depend on clone-embedded-tasks and include the cloned files as sources for the Go build.
  1. Embedding Logic (cli/embedded.go):
  • Created a new file cli/embedded.go that uses Go's //go:embed directive to include the embedded-tasks folder in the binary.
  • Implemented ExtractEmbeddedTasks() which extracts the embedded tasks to ~/.ops/.olaris if they don't already exist.
  1. Runtime Logic (cli/main.go):
  • Modified Main() to call ExtractEmbeddedTasks() if the tasks are not found in the usual locations.
  • This ensures the CLI is self-contained and works offline on the first run.
  1. Task Discovery (cli/prepare.go):
  • Updated locateOpsRoot() to check ~/.ops/.olaris as a last resort before attempting to download tasks from GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Release] Embed tasks in the cli

1 participant